/**
 * 2016，thor.com，all rights reserved。
 * 
 * Project：		palmmall-core
 * Filename：	SPasswordInfoConverter.java
 * Created：		2016年7月30日
 * Creator：		wolv
 */
package com.thor.palmmall.rest.statement.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.commons.entity.UCN;
import com.thor.commons.util.ConverterUtil;
import com.thor.palmmall.rest.statement.AQueryByContractParam;
import com.thor.palmmall.spi.statement.SQueryByContractParam;

/**
 * @author wolv
 *
 */
public class SQueryByContractParamConverter implements Converter<AQueryByContractParam, SQueryByContractParam> {

	public static SQueryByContractParamConverter getInstance() {
		if (instance == null)
			instance = new SQueryByContractParamConverter();
		return instance;
	}

	private static SQueryByContractParamConverter instance;

	private SQueryByContractParamConverter() {
	}

	@Override
	public SQueryByContractParam convert(AQueryByContractParam source) {
		if (source == null)
			return null;

		SQueryByContractParam target = new SQueryByContractParam();
		target.setBeginSettle(source.getBeginSettle());
		target.setContract(source.getContract());
		target.setEndSettle(source.getEndSettle());
		target.setStores(source.getStores());
		target.setUserGroups(source.getUserGroups());
		return target;
	}

}
